home *** CD-ROM | disk | FTP | other *** search
- ************************************************************************
- *
- * TSS.PRG
- * Time Sheet System version 1.5
- * Main menu
- *
- * written by Allan J. Sieker
- *
- * uses procedure files TSSPROC.PRG, TSSREPT.PRG, TSSFUNCT.PRG
- * The BROW function emulates the dbase BROWSE function, see TSSFUNCT.PRG
- *
- * org 01/ /85 - for dB3
- * chg 08/ /85 - modified for Clipper
- * chg 03/15/86 - report title change and improved brow function
- * chg 03/25/86 - new clipper.lib (w85) has a larger memory requirement
- * causing the archive selection to bomb on a 256K machine.
- * Decided to shorten code instead of using overlays.
- * Changed archive program to only archive one pay period
- * and not archive both pay periods.
- * Also dropped the monthly summary report.
- * chg 04/15/86 - add bell to respond to EOF() on support files during entry
- * (to wake up Bernice when she has a data problem pending)
- * chg 06/02/86 - compiled and linked proc file to fix index problem
- * chg 06/25/86 - changed TSSREPT.PRG and TSSPROC.PRG.
- * changed report titles to come from TSSSTAT.DBF.
- * changed structure of TSSSTAT.DBF - added fields:
- * COMPANY_1,C,40
- * COMPANY_2,C,40
- *
- *************************************************************************
- *************************************************************************
- *
- * SPECIAL NOTE:
- *
- * When compiling with Clipper w85 the following command sequence will
- * generate an assignment error:
- *
- * IF CLIPPER
- * DO BROW ..........
- * ELSE
- * BROWSE FIELDS ......
- * ENDIF
- *
- * This error is because Clipper does not recognize the BROWSE command.
- * Ignore this error and continue with the linking. I haven't had any
- * problems and I have been doing it since the summer of 1985.
- *
- * The indicated SET commands below will not be recognized by Clipper.
- * I have also ignored these errors without any problems.
- *
- * If you are a worry-wart, then just remove the IF..ELSE..ENDIF altogether
- * and end up with:
- *
- * DO BROW .....
- *
- * And just don't try to run it in dBase.
- *
- *************************************************************************
- *************************************************************************
- *
- * Clipper compiling note:
- *
- * I compiled each of the TSS modules individually so that I wouldn't need
- * to do a full scale compile if I only changed one of the modules.
- * The top level module requires a .CLP file so that all lower level
- * modules won't be compiled.
- *
- * TSS.CLP contains:
- * TSS
- *
- * Compile: CLIPPER @TSS
- * CLIPPER TSSFUNCT
- * CLIPPER TSSPROC
- * CLIPPER TSSREPT
- *
- *
- *
- * Plink linking notes:
- *
- * I used a .LNK file for linking.
- *
- * TSS.LNK contains:
- * FI TSS
- * FI TSSFUNCT
- * FI TSSPROC
- * FI TSSREPT
- * LIB \DBASE\CLIPPER
- *
- * Link: PLINK86 @TSS
- *
- * Note:
- * I have dBase and Clipper in a subdirectory called DBASE.
- *
- *************************************************************************
- *************************************************************************
- *
- * init stuff for testing in dB3+
- *
- CLEAR ALL
- SET BELL OFF
- SET DELIM OFF
- SET DELETED ON
- SET TALK OFF
- SET SAFETY OFF
- SET PRINT OFF
- SET STATUS OFF && Clipper will not recognize this
- SET HELP OFF && Clipper will not recognize this
- SET MENU OFF
- SET DEVICE TO SCREEN
- *
- *************************************************************************
-
- CLEAR
- TEXT
- ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░
- ▓░░░░░░░▓▓▓░░░░░░░▓░ ▓▓░░░░░░░░░░░░░▓▓░ ▓▓░░░░░░░░░░░░░▓▓░
- ▓░ ▓▓▓░ ▓░ ▓▓▓░ ▓▓▓░ ▓▓▓░ ▓▓▓░
- ▓▓▓░ ▓▓▓░ ▓▓▓░
- ▓▓▓░ ▓▓▓░ ▓▓▓░
- ▓▓▓░ ▓▓▓░ ▓▓▓░
- ▓▓▓░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░
- ▓▓▓░ ░░░░░░░░░░░░░░▓▓▓░ ░░░░░░░░░░░░░░▓▓▓░
- ▓▓▓░ ▓▓▓░ ▓▓▓░
- ▓▓▓░ ▓▓▓░ ▓▓▓░
- ▓▓▓░ ▓▓▓░ ▓▓▓░
- ▓▓▓░ ▓▓▓░ ▓▓▓░ ▓▓▓░ ▓▓▓░
- ▓▓▓░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░
- ▓▓▓░ ░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░
-
- Time Sheet System (TSS)
- Version 1.5
- 06/25/86
- Copyright (c) 1986 by A. J. Sieker
-
- TSSDATA diskette is required in drive B:
-
- ENDTEXT
-
- PUBLIC SEL,P_WIDTH,ERROR,REPLY,BELL,CLIPPER
-
- *************************************************************************
- *
- * everything declared here is treated as PUBLIC
- *
-
-
- * if you intend to run in just dBase only, change the macro drive
- * assignments to suit your needs.
- *
- IF CLIPPER
- * target (compiled) installation is with diskette drives
- *
- A_DRIVE='A:' && macro drive A: assignment = A:
- B_DRIVE='B:' && macro drive B: assignment = B:
- NDX='.NTX' && clipper indexes are used
- DELAY=100
- ELSE
- * testing (dbase) is on the hard disk
- *
- A_DRIVE='C:' && macro drive A: assignment = C:
- B_DRIVE='C:' && macro drive B: assignment = C:
- NDX='.NDX' && dbase indexes are used
- DELAY=20
- ENDIF
-
- * define macro filenames
- *
- TSSINPUT=B_DRIVE+'TSSINPUT'
- TSSCONTR=A_DRIVE+'TSSCONTR'
- TSSDEPT=A_DRIVE+'TSSDEPT'
- TSSEMPL=A_DRIVE+'TSSEMPL'
- TSSENAME=A_DRIVE+'TSSENAME'
- TSSENMBR=A_DRIVE+'TSSENMBR'
- TSSRCTRL=A_DRIVE+'TSSRCTRL'
- TSSSTAT=A_DRIVE+'TSSSTAT'
- TSSF01=B_DRIVE+'TSSF01'
- TSSF01A=B_DRIVE+'TSSF01A'
- TSSF01B=B_DRIVE+'TSSF01B'
- TSSF01C=B_DRIVE+'TSSF01C'
- TSSF01D=B_DRIVE+'TSSF01D'
- TSSF02=B_DRIVE+'TSSF02'
-
- BELL=CHR(7)
-
- * open default procedure file
- *
- SET PROCEDURE TO TSSPROC
-
- * verify required files are available
- *
- DO INITDBF
- IF ERROR
- CLOSE DATA
- CLOSE INDEX
- RETURN
- ENDIF
-
- SELECT E
- * get company titles for reports
- *
- CO_NAME_1=TRIM(COMPANY_1) && company name
- CO_NAME_2=TRIM(COMPANY_2) && division name
-
- * set max printer width to value in status file
- *
- P_WIDTH=WIDTH
-
- SELECT A
-
- * file usage in normal mode - report section uses different files
- *
- * A=Input data file (hours) TSSINPUT in drive B:
- * B=Master Employee file TSSEMPL in drive A:
- * C=Master Contract file TSSCONTR "
- * D=Master Department file TSSDEPT "
- * E=Status file TSSSTAT "
- * F=Report control file TSSRCTRL "
- * G=Temp. work area
- *
- SEL=' '
- DO WHILE SEL#'0'
- SEL=' '
- CLEAR
- TEXT
- Time Sheet System Menu
-
- 1. Enter Time Sheets
- 2. Edit Time Sheets
- 3. Verify Input Data against Master Files
-
- 4. Payroll Reports (each pay period)
- 5 Archive Time Sheet Data
- 6. Edit Report Contract List
-
- 7. Edit Master Dept List
- 8. Edit Master Employee List
- 9. Edit Master Contract List
-
- R. Regenerate File Indexes (Pack & Reindex)
- S. Status
- M. Maintenance (Time sheet input data only)
-
- 0. Exit Program
-
- ENDTEXT
- @ 22,0 SAY 'Enter Selection ' GET SEL
- READ
- DO CASE
- CASE SEL='1'
- DO INPUT
- CASE SEL='2'
- DO EDIT
- CASE SEL='3'
- DO VERIFY
- CASE SEL='4'
- SET PROCEDURE TO TSSREPT
- DO REPT
- SET PROCEDURE TO TSSPROC
- DO INITDBF
- CASE SEL='5'
- DO ARCHIVE
- CASE SEL='6'
- DO REPTLIST
- CASE SEL='7'
- SELECT D
- GOTO TOP
- IF CLIPPER
- DO BROW WITH 'DEPT','NAME',' ',' '
- ELSE
- BROWSE FIELDS DEPT,NAME
- ENDIF
- SELECT A
- CASE SEL='8'
- SELECT B
- SET INDEX TO &TSSENAME,&TSSENMBR
- GOTO TOP
- IF CLIPPER
- DO BROW WITH 'LAST_NAME','FIRST_NAME','EMPL_NO',' '
- ELSE
- BROWSE FIELDS LAST_NAME,FIRST_NAME,EMPL_NO
- ENDIF
- SET INDEX TO &TSSENMBR
- GOTO TOP
- SELECT A
- CASE SEL='9'
- SELECT C
- GOTO TOP
- IF CLIPPER
- DO BROW WITH 'CONTRACT','NAME','HEAD',' '
- ELSE
- BROWSE FIELDS CONTRACT,NAME,HEAD
- ENDIF
- SELECT A
- CASE SEL='R'
- DO REGEN
- CASE SEL='S'
- DO STATUS
- CASE SEL='M'
- DO MAINT
- ENDCASE
- ENDDO
- CLOSE DATA
- CLOSE INDEX
-
- RETURN
- *
- ************************************************************************
- *************************************************************************
- *
- * end of file - TSS.PRG
- *
- *************************************************************************